# coding:utf-8
# Project:pyinterface
# author:wj
# time:2022/12/20 14:42
# Email:1305137785@qq.com
from loguru import logger
from tool.handle_path import log_name
import pytest,os

# 这里是添加日志，设置日志保留的天数、日志凌晨生成一个新的日志文件，以及日志编码格式
logger.add(log_name,
           retention="10 days",
           rotation='00:00',
           compression="zip",
           encoding="utf-8"
           )


# =========================生成allure报告=========================
pytest.main(["-s","-v",
             "-m","shop or test",
             "--alluredir=outputs/report",
             "--clean-alluredir"
             ])
os.system("allure generate outputs/report -o outputs/html --clean")

